<template>
  <a-modal
    title="用户详细信息"
    width="80%"

    :visible="visible"
    @ok="submit"
    @cancel="() => { $emit('cancel') }"
    :footer="null"
  >
    <div>

      <agent :basekey="basekey" v-if="model == 'agent'"></agent>
      <company :basekey="basekey" v-if="model == 'company'"></company>
      <user :basekey="basekey" v-if="model == 'user'"></user>
      <iframe v-if="model == 'iframe'" src="http://crm.duofangtongxin.com"></iframe>
    </div>
  </a-modal>
</template>

<script>
import agent from './components/agent'
import user from './components/user'
import company from './components/company'
export default {
  props: {
    visible: {
      type: Boolean,
      required: true
    },
    model: {
      type: String,
      required: true
    },
    basekey: {
      type: [Number, String],
      required: true
    }
  },
  watch: {
  },
  data () {
    return {
    }
  },
  components: {
    agent,
    user,
    company
  },
  created () {
  },
  methods: {
    submit () {
      console.log(this.form)
    }
  }
}
</script>
<style lang='less' scoped>
iframe{
  width: 80vw;
  height: 80vh;
}
</style>
